= simple_form_for resource do |f|
  = f.input :booking_import_attachment_id, :as => :hidden

  .row-fluid
    .span6
      = f.input :reference

  .row-fluid
    .span6
      = f.input :start_date, :as => :date_field
    .span6
      = f.input :end_date, :as => :date_field

  .row-fluid
    .span6
      = f.association :account

  .row-fluid.form-actions
    = f.button :submit

  %table.table.table-striped.table-condensed
    = f.fields_for :bookings do |b|
      %tr[b.object]
        %td.value_date= b.input :value_date, :as => :string, :wrapper => :inline, :readonly => true, :input_html => { :tabindex => -1 }
        %td.amount.currency= b.input :amount, :as => :string, :wrapper => :inline, :readonly => true, :input_html => { :tabindex => -1 }
        %td.title= b.input :title, :wrapper => :inline, :readonly => true, :input_html => { :tabindex => -1 }
        %td.comments= b.input :comments, :wrapper => :inline, :input_html => {:rows => 2}
        %td.debit_account.span2= b.association :debit_account, :collection => accounts_as_collection(Account.all), :as => :combobox, :wrapper => :inline
        %td.credit_account.span2= b.association :credit_account, :collection => accounts_as_collection(Account.all), :as => :combobox, :wrapper => :inline
